package handler

import (
	"github.com/zeromicro/go-zero/rest"
	"github.com/cain/dighuman-server/internal/svc"
)

func RegisterHandlers(server *rest.Server, svcCtx *svc.ServiceContext) {
	server.AddRoutes(
		[]rest.Route{
		{
			Method:  http.MethodPost,
			Path:    "/api/v1/auth/register",
			Handler: RegisterHandler(svcCtx),
		},
		{
			Method:  http.MethodPost,
			Path:    "/api/v1/auth/login",
			Handler: LoginHandler(svcCtx),
		},
		{
			Method:  http.MethodGet,
			Path:    "/api/v1/user/me",
			Handler: UserInfoHandler(svcCtx),
		},
		},
	)
}